import axios from "@/utils/axiosUtils"
//将数据类型约束放在外部的types文件夹中
import {IUser} from "@/types/userInterface"
//get请求获取所有的数据
export const getAllUser = ()=>{
	return axios.get("/users/findAll")
}
//get请求根据id获取数据
export const getUserById = (data:IUser)=>{
	return axios.get("/users/findAll",{
    params:data
  })
}
//get请求根据id获取数据
export const addUser = (data:IUser)=>{
	return axios.post("/users/add",data)
}
